<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<style>
		html,
			body {
				height: 100%;
				margin: 0;
				padding: 0
			}
			
			ul,
			li {
				text-indent: 0;
				text-decoration: none;
				margin: 0;
				padding: 0
			}
			
			img {
				border: 0
			}
			
			body {
				background-color: #white;
				color: #999;
				font: 100%/18px helvetica, arial, sans-serif
			}
			
			canvas {
				cursor: crosshair;
				display: block;
				left: 0;
				position: absolute;
				top: 0;
				z-index: 20
			}
		
	</style>
	 <script type="text/javascript" src="js/jquery.min.js"></script>

		<!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

		<!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
	<meta charset="utf-8">
	<title>分类</title>
	<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
	<script type="text/javascript" src="js/jquery.easing.js"></script>
	<script type="text/javascript" src="js/jquery.scrollpath.js"></script>
	<script type="text/javascript" src="js/dmaku.js"></script>
	<link rel="stylesheet" href="css/dmaku.css" type="text/css" media="screen"/>
</head>
<!--/************************************************************
 *																*
 * 						      代码库							*
 *                        www.dmaku.com							*
 *       		  努力创建完善、持续更新插件以及模板			*
 * 																*
**************************************************************-->
<body>
	
	
	<?php
mysql_connect("localhost","root","1161105403");
mysql_select_db("neuvideo");
mysql_query("set names utf8");
						 //查询首页电影专栏的六个视频
 $sql1="select * from videotype where typename='电影'";
	$result1 = mysql_query($sql1) or die('查询失败！'.mysql_error());  
	$row1=mysql_fetch_assoc($result1);
	$tid1=$row1["tid"];
	//根据查的的视频id查询电影栏目的六条记录
	$sql11="select * from videos where tid='$tid1' limit 6";
	$result11 = mysql_query($sql11) or die('查询失败！'.mysql_error());  
//查询首页电视剧专栏的六个视频
 $sql2="select * from videotype where typename='电视剧'";
	$result2 = mysql_query($sql2) or die('查询失败！'.mysql_error());  
	$row2=mysql_fetch_assoc($result2);
	$tid2=$row2["tid"];
	//根据查的的视频id查询电视剧栏目的六条记录
	$sql22="select * from videos where tid='$tid2' limit 6";
	$result22 = mysql_query($sql22) or die('查询失败！'.mysql_error());  
//查询首页动画片专栏的六个视频
$sql3="select * from videotype where typename='动画片'";
	$result3 = mysql_query($sql3) or die('查询失败！'.mysql_error());  
	$row3=mysql_fetch_assoc($result3);
	$tid3=$row3["tid"];
	//根据查的的视频id查询动画片栏目的六条记录
	$sql33="select * from videos where tid='$tid3' limit 6";
	$result33 = mysql_query($sql33) or die('查询失败！'.mysql_error());  
//查询首页显示的点击排行4个视频和下载排行的前4个视频，降序排
 $sql5="select * from videos  order by hittimes desc  limit 4";
	$sql6="select * from videos  order by downtimes desc  limit 4";
	$result5 = mysql_query($sql5) or die('查询失败！'.mysql_error());  
	$result6 = mysql_query($sql6) or die('查询失败！'.mysql_error());  
						?>
	
	
<!-- 代码 开始 -->
<nav id="menu" >
	<ul >
		<li id="home" ><a href="#home" class="home" style="color: white;font-size: x-large;">首页</a><br/><img src="images/xiao.gif"></li>
		<li><a href="#about" class="about" style="color: white;font-size: x-large;">电影栏目</a></li>
		<li><a href="#culture" class="culture" style="color: white;font-size: x-large;">电视剧栏目</a></li>
		<li><a href="#joinus" class="joinus" style="color: white;font-size: x-large;">动漫栏目</a></li>
		<li><a href="#address" class="address" style="color: white;font-size: x-large;">点击排行</a></li>
		<li><a href="#guangGao" class="guangGao" style="color: white;font-size: x-large;">下载排行</a></li>
	</ul>
</nav>

<div id="rightNav"><a href="javascript:;" target="_blank" class="circleButton" id="scrollInfo"></a></div>

<div class="wrapper" style="position:relative;transform-origin:5400px 1350px 0px;transform:translate(-4680px, -985.5px) rotate(1.5708rad);">

	<div class="bgLine one"></div>
	<div class="bgLine two"></div>
	<div class="bgLine three"></div>
	<div class="bgLine four"></div>
	<div class="bgLine five"></div>
	<div class="bgLine six"></div>
	<div class="bgLine seven"></div>

	<div class="wrap home">
		<div class="content">
			
		</div>
	</div>

	<div class="wrap about">
		<div class="content">
		 <div class="row">
                   <marquee> <h2 style="color: mediumvioletred;"align="left"><i>电影栏目:</i></marquee>
</h2>
                    <ul class="list-inline row text-center">
                        <?php
                        while($row1=mysql_fetch_assoc($result11))
                        {
						?>
                        <div class="col-xs-5 col-sm-4 col-lg-4">
                            <img src="/final_project/foreground_system/lite/images/<?php
                            echo $row1["pic"];
                            ?>" class="responsive img-thumbnail"/>

                            <p><a href="show.php?vid=<?php
                            echo $row1["vid"];
                            ?>"><?php
                            echo $row1["videoname"];
                            ?></a>
                            </p>
                        </div>
                    <?php
                    }
                    ?>
                    </ul>
                    <a  class="btn btn-red" href="list.php?tid=<?php
                    echo $tid1; ?>" role="button">
                    <img src="images/xiao.gif" height="40" width="40">
                    	点我获取更多好看的视频哟~ </a>
                </div>  
		</div>
	</div>

	<div class="wrap culture">
		<div class="content">
			<div class="row">
                    <marquee> <h2 style="color: mediumvioletred;"align="left"><i>电视剧栏目:</i>
</h2></marquee> 
                    <ul class="list-inline row text-center">
                        <?php
                        while($row2=mysql_fetch_assoc($result22))
                        {
						?>
                        <div class="col-xs-5 col-sm-4 col-lg-3">
                            <img src="/final_project/foreground_system/lite/images/<?php
                            echo $row2["pic"];
                            ?>" class="responsive img-thumbnail"/>

                            <p><a href="show.php?vid=<?php
                            echo $row2["vid"];
                            ?>"><?php
                            echo $row2["videoname"];
                            ?></a>
                            </p>
                        </div>
                    <?php
                    }
                    ?>
                    </ul>
                    <a  class="btn btn-red" href="list.php?tid=<?php
                    echo $tid2; ?>" role="button"><img src="images/xiao.gif" height="40" width="40">点我获取更多好看的视频哟~ </a>
                </div>  
		</div>
	</div>
	
	<div class="wrap joinus"> 
		<div class="content">
			 <div class="row">
                 <marquee>    <h2 style="color: mediumvioletred;"align="left"><i>动漫栏目:</i>
</h2></marquee> 
                    <ul class="list-inline row text-center">
                        <?php
                        while($row3=mysql_fetch_assoc($result33))
                        {
						?>
                        <div class="col-xs-5 col-sm-4 col-lg-4">
                            <img src="/final_project/foreground_system/lite/images/<?php
                            echo $row3["pic"];
                            ?>" class="responsive img-thumbnail"/>

                            <p><a href="show.php?vid=<?php
                            echo $row3["vid"];
                            ?>"><?php
                            echo $row3["videoname"];
                            ?></a>
                            </p>
                        </div>
                    <?php
                    }
                    ?>
                    </ul>
                    <a  class="btn btn-red" href="list.php?tid=<?php
                    echo $tid3; ?>" role="button">
                    <img src="images/xiao.gif" height="40" width="40">点我获取更多好看的视频哟~ </a>
                </div>  
		</div>
	</div>
	
	<div class="wrap address">
		<div class="content">
			 <div class="row">
                 <marquee>    <h2 style="color: mediumvioletred;"align="left"><i>点击排行~</i>
</h2></marquee> 
                   <ul class="list-inline row text-center">
				<?php
				while($row5=mysql_fetch_assoc($result5))
				{
				?>
				<li class="col-xs-12 col-lg-3">
                        <img src="/final_project/foreground_system/lite/images/<?php
                        echo $row5["pic"];
                        ?>" class="responsive img-thumbnail" />
                        <p><a href="show.php?vid=<?php
                            echo $row5["vid"];
                            ?>"><?php
						//显示视频名称中的前5个字符
                        echo mb_substr($row5["videoname"],0,6,'utf-8');
                        ?></a>
                        </p>
                    </li>
                 <?php
				}
                 ?>
               </ul>
                 
                </div>  
		</div>
	</div>
	
	<div class="wrap guangGao">
		<div class="content">
			<div class="row">
				  <marquee>    <h2 style="color: mediumvioletred;"align="left"><i>下载排行~</i>
</h2></marquee> 
				<ul class="list-inline row text-center">
				<?php
				while($row6=mysql_fetch_assoc($result6))
				{
				?>
				<li class="col-xs-12 col-lg-3">
                        <img src="/final_project/foreground_system/lite/images/<?php
                        echo $row6["pic"];
                        ?>" class="responsive img-thumbnail" />
                        <p><a href="show.php?vid=<?php
                            echo $row6["vid"];
                            ?>"><?php
						//显示视频名称中的前5个字符
                        echo mb_substr($row6["videoname"],0,6,'utf-8');
                        ?></a>
                        </p>
                    </li>
                 <?php
				}
                 ?>
               </ul>
			</div>
			
		</div>
	</div>
	
</div>
<!-- 代码 结束 -->
</body>
</html>